package com.baidu.project.chart11;

public class Adapter implements Cat,Dog{
    private Dog dog;
    private Cat cat;

    public Adapter(Dog dog){
        this.dog = dog;
    }

    public Adapter(Cat cat){
        this.cat = cat;
    }
    @Override
    public void CatCatchMice() {
        dog.DogBarking();
    }

    @Override
    public void DogBarking() {
        cat.CatCatchMice();
    }
}